package com.example.administrator.systemfailreport.activity;

import android.content.Context;
import android.support.v4.app.FragmentActivity;
import android.support.v4.view.ViewPager;
import android.os.Bundle;
import android.support.design.widget.TabLayout;

import com.example.administrator.systemfailreport.R;
import com.example.administrator.systemfailreport.adapter.FaultRecordAdapter;


public class FaultRecordActivity extends FragmentActivity {

    ViewPager pager  = null;
    TabLayout tagView = null;
    Context context = null;
    FaultRecordAdapter adapter;
    private String userId;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_fault_record);
        context=this;
        Bundle bun=getIntent().getExtras();
        //userId=bun.getString("userId");
        userId="zxk";
        initView();
    }


    private void initView() {
        pager=(ViewPager)findViewById(R.id.vg_fault_content);
        tagView=(TabLayout)findViewById(R.id.tl_fault_title);
        adapter=new FaultRecordAdapter(getSupportFragmentManager(),userId);
        pager.setAdapter(adapter);
        tagView.setupWithViewPager(pager);
    }

}
